define(function(require) {

    var $ = require('$'),
        AV = require('leancloud'),
        Gomac = require('gomac');
    AV.$ = $;
    AV.initialize("bgtfxocr1mbuq7zyjjijcbnzwz4wp35ketuo9mscxu8elzyd","i31o6xuu9cwdxgg1681glgyacb4fg79pg4yhub8w3rbrqy7q");

    $(function() {
        setTimeout(function(){
            var template = require('tpl/main.html');
            $('body').prepend( template );

            // 创建并初始化应用
            var gomac = new Gomac({
                modalTitle: '有朋·友聚',
                modalButtonOk: '确定',
                modalButtonCancel: '取消',
                gomac: true
            });

            // 添加视图
            var mainView = gomac.addView('.view-main', {
                dynamicNavbar: true
            });

        }, 1000);
    });
});